<html>

<head>
    <script type="text/javascript" src="jquery.js"></script>
    <meta http-equiv="Content-Type" content="text/html; charset=utf8">
    <title>js</title>


</head>

<body>
    <!--<button onclick="window.open('ceeloConsole:','_self')">-->
    <!--打开控制器-->
    <!--</button>-->
    <button id="playDota" onclick="window.open('ceeloConsole:','_self')">启动DOTA2</button>
    <button id="teamFightBt">团战跳转</button>
    <a href="http://127.0.0.1:9090/cmd?cmd=playdemo replays/3261175755.dem">123</a>
    <a href="http://127.0.0.1:9090/teamfight?startTick=40000">123</a>

</body>
<script language="JavaScript">
    function open_exe(shellp) {
        try {
            a = new ActiveXObject("wscript.shell");
            a.run(shellp);
        } catch (e) {
            alert('找不到文件"' + shellp + '"(或它的组件之一)。请确定路径和文件名是否正确.')
        }
    }
    $('#playDota').click(function() {
        location.href = "steam://run/570//-perfectworld -vconsole"
    })

    $("#teamFightBt").click(function() {
        $.get('http://127.0.0.1:9090/playdemo?matchID=3054488401', function(data) {
            console.log(data)
            switch (data.Status) {
                case 1:
                    location.href = "steam://run/570//-perfectworld -vconsole"
                    break;
                case 0:
                case 3:
                    console.log("gotoTick", data.Status)
                    $.get("http://127.0.0.1:9090/teamfight?startTick=40000", function(result, status) {
                        console.log(result)
                    })
                    break;
                case 2:
                case 4:
                case 5:
                    alert(data.Text)
                    break;
                default:
                    break;
            }
        }, 'json');
    });
</script>

</html>